package com.example.springbootvue.Mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.springbootvue.Pojo.Student;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;


//extends BaseMapper<Student>
@Mapper
public interface Getmapper  {

    @Select("select * from student where id = #{id}")
    public Student get(Integer id);

    @Select("select * from student ;")
    public Student[] getAll();

    @Insert("insert into student(name,age,gender) values(#{name},#{age},#{gender})")
    String Insert(Student student);

    @Select("select * from student where id = #{id}")
    Student getUserById(Integer id);
}
